#pragma once
#ifndef AGENT_H
#define AGENT_H

#include "vertex.h"
#include "AVector.h"
#include "structure.h"
#include <iostream>

using namespace std;

#ifndef TEAM_T
#define TEAM_T
enum team_T {RED, BLUE};
#endif//TEAM_T

enum shape_T {CIRCLE, TRIANGLE, RECTANGLE};

struct target_T {
	bool isAgent;
	void * targetObj;
	float distance;
	bool inRange;
};

class agent
{
public:
	agent(void);
	agent(shape_T, vertex, AVector, team_T);
	~agent(void);

	shape_T type;
	vertex position;
	AVector velocity;
	float direction;         // Degree facing angle
	vertex goal;             // Goal vertex
	float speedLimit;        // Agent speed limit
	target_T target;         // Agent's attack target (targetObj pointer is null if no target is active)
	team_T team;

	// Game stats
	int hp;
	int atkInterval, atkTimer;
	int atkPower;

	vertex getTargetPosition();
	bool atkTarget();
};
#endif
